import 'package:bxultimate/app/router/router_name.dart';
import 'package:bxultimate/data/request/application_request.dart';
import 'package:get/get.dart';

import 'state.dart';

class ExaminationResultController extends GetxController {
  final ExaminationResultState state = ExaminationResultState();

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();

    getData();
  }

  getData() async {
    state.result = await ApplicationRequest.viewExamFinishResult(Get.arguments);
    state.answerSheetList = await ApplicationRequest.getExamDtk(Get.arguments);
  }

  void toANswerCardResult() {
    Get.toNamed(RouterName.examinationAnswerCardResult,
        arguments: Get.arguments);
  }
}
